package com.qining618.cms.cms.mapper;

import com.qining618.cms.cms.domain.Comment;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * <p>
 * CMS评论表 Mapper 接口
 * </p>
 *
 * @author qining
 * @date 2019-09-17
 */
@Mapper
@Repository
public interface CommentMapper extends BaseMapper<Comment> {

    /**
     * 评论id是否存在
     * @param id 评论id
     * @return Long
     */
    @Select(value = "select count(1) from c_comment where id = #{id}")
    boolean existById(@Param("id") Long id);
}
